package com.example.zhang.config;

import com.example.zhang.util.SerialPortUtil;
import org.springframework.context.annotation.Configuration;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;

@Configuration
public class SerialPortConfig {
    
    @PostConstruct
    public void init() {
        SerialPortUtil.init();
    }
    
    @PreDestroy
    public void destroy() {
        SerialPortUtil.close();
    }
} 